//package io.spherelabs.manager.password
package com.gitee.wsl.struct.generator

import com.gitee.wsl.security.password.UppercaseRandom
import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertNotNull

class UppercaseRandomTest {

    private  var uppercaseRandom: UppercaseRandom = Generator.UppercaseRandom

    @Test
    fun `check the digital random is working correctly with length 10`() {
        val random = uppercaseRandom(10)

        println(random)

        assertEquals(10, random.length)
        assertNotNull(random)
        assertEquals(true, random.all { it.isUpperCase() })
    }

    @Test
    fun `check the digital random is working correctly with length 5`() {
        val random = uppercaseRandom(5)

        println(random)

        assertEquals(5, random.length)
        assertNotNull(random)
        assertEquals(true, random.all { it.isUpperCase() })
    }

    @Test
    fun `test file name`(){

        (0..20).forEach {
            println(Generator.FileName(it))
        }
        
    }
}